class Solution:
	# @param {integer[]} height
	# @return {integer}
	def maxArea(self, height):
		ans = 0
		i, j = 0, len(height)-1
		while i < j:
			if height[i] > height[j]:
				ans = max(ans, height[j]*(j-i))
				j -= 1
			else:
				ans = max(ans, height[i]*(j-i))
				i += 1
		return ans

if __name__ == '__main__':
	print Solution().maxArea([1,1])